{% extends './layout.html' %}
{% block title %}
    WeChat Configuration
{% endblock %}
{% block style %}
{% endblock %}
{% block body %}
    <div style="text-align:center">
        <h1>WeChat Configuration</h1>
    </div>
    <div style="margin:10px;">
    <a class="button button-default" href="{{ url_for('wechat_refresh') }}">Refresh token</a>
    <a class="button button-default" href="{{ url_for('wechat_setting') }}">Edit</a>
    </div>
    <div>
    {% if wechat %}
    <table class="table table-striped">
        <tr><th>App ID</th><td>{{ wechat.appid }}</td><th>Secret</th><td>{{ wechat.secret }}</td><th>NonceStr</th><td>{{ wechat.noncestr }}</td></tr>
        <tr><th>Token Expires</th><td>{{ wechat.token_expires }}</td><th>Token Time</th><td colspan="3">{{ wechat.token_time }}</td></tr>
        <tr><th>Token</th><td colspan="5">{{ wechat.token }}</td></tr>
        <tr><th>Ticket Expires</th><td>{{ wechat.jsticket_expires }}</td><th>Ticket Time</th><td colspan="3">{{ wechat.jsticket_time }}</td></tr>
        <tr><th>JS Ticket</th><td colspan="5">{{ wechat.jsticket }}</td></tr>
        <tr>
            <th>Signature</th><td colspan="5">{{ sign }}</td>
        </tr>
    </table>
    {% endif %}
    </div>
{% endblock %}
